package test2;

public class Company {
    private String name;
    public Company(String name) {
        super();
        this.name=name;
    }

    @Override
    public String toString() {
        return name ;
    }
    @Override
    public boolean equals(Object obj) {
        if (this == obj) return true;
        if (!(obj instanceof Company)) return false;
        Company company = (Company) obj;
        return name != null ? name.equals(company.name) : company.name == null;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
